package cn.bdqn.layui.service.user;

import cn.bdqn.layui.entity.Role;
import cn.bdqn.layui.entity.User;
import cn.bdqn.layui.entity.vo.UserVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import java.util.List;

public interface UserService {
    UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException;

    User findByUserName(String userName, Integer id);

    List<Role> getRolesById(Integer uid);

    List<User> findUserList(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize,
                            @Param("id") Integer id, @Param("userName") String userName);

    int findUserCount(@Param("id") Integer id, @Param("userName") String userName);

    int addUser(UserVO userVO);

    int addUserRole(Integer uid, Integer rid);


    int delUser(String id);


    int updateUser(UserVO userVO);

    List<UserVO> findByUid(Integer uid);

    int deleteUserRole(Integer id);

    List<UserVO> findByBangKe(Integer bangkeStatic);


}
